package com.smbms.service.user.impl;

import com.smbms.service.user.UserService;
import com.zhz.dao.user.UserDao;
import com.zhz.dao.user.UserDaoFactory;
import com.zhz.dao.user.impl.UserDaoImpl;
import com.zhz.entity.User;

public class UserServiceImpl implements UserService {
    //通过工厂获取所依赖的用户DAO对象
    private UserDao dao=UserDaoFactory.getInstance();
    @Override
    public void addNewUser(User user) {
        //调用UserDao的方法保存用户信息
        dao.save(user);
    }
}
